<template>
    <div>
        <h2>TsInfo</h2>

        {{ age }}
        <hr>
        {{ allow }}
        <hr>
        {{ hobbys }}
        <hr>
        {{ size }}
        <hr>
        {{ cb }}
    </div>
</template>
<script>
export default {
    // props: ['lastName', 'firstName', "age"]
    props: {
        phone: {
            validator: (value) => {
                return /^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(value);
            }
        },
        gender: {
            validator: (value) => {
                return ['1', '2'].includes(value);
            }
        },
        lastName: String,
        firstName: String,
        age: {
            type: [Number, String],
            default: 100,
        },
        allow: {
            type: Boolean,
            required: true
        },
        hobbys: {
            type: Array,
            default: function () {
                return ['css']
            }
        },
        size: Object,
        cb: Function
    }
}
</script>
<style></style>